package com.whfc.iot.mach.entity;

import com.whfc.iot.mach.constant.MsgConst;
import lombok.Data;

import java.util.List;

/**
 * @Description: 硬件阈值参数
 * @author: xugcheng
 * @version: 1.0
 * @date: 2021-01-06 11:24
 */
@Data
public class MachParamThreshold extends MachParamItem {

    /**
     * 阈值个数
     */
    private int count;

    /**
     * 阈值列表
     */
    private List<MachThresHold> thresHoldList;

    @Override
    public int paramType() {
        return MsgConst.PARAM_TYPE_THRESHOLD;
    }

    @Override
    public int dataLength() {
        return count * (1 + 4) + 1;
    }
}
